<?php
class Trainingofferupdate_Model_Trainingofferupdate implements Trainingofferadmin_Model_Mainable, 
        Trainingofferadmin_Model_Decidable {
    
    public $action_handler;
    
    public function main(array $variables = null) {
        $this->model_decision($variables);
    }

    public function model_decision(array $variables = null) {
        if(isset($variables['csrf_token']) && ($variables['csrf_token'] == $_SESSION['csrf_token'])){
            $this->action_handler = new Trainingofferadmin_Data_Trainingofferupdate;
            $this->action_handler->main($variables);
        }
        else {
            session_destroy();
            $this->action_handler = new Login_Data_Loginredirect;
            $this->action_handler->main($variables);
        }
    }

}
